<template>
  <div class="about">
    <button @click="getMessage">显示信息</button>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
import { Message } from "../../packages/message"

export default defineComponent({
  setup(){
    let num = ref(0)
    const getMessage = () => {
      num.value ++
      Message({
        message: "hello" + num.value,
        type: 'info'
      })
    }
    return{
      getMessage
    }
  }

  /**
  methods: {
    // getMessage(){
    getMessage(this: {$message: ()=>void}){
      // Message()
      // (this as any).$message()
      this.$message()
    }
  }
  */
})
</script>

